script(src="/rating.js")
h1= title
h2
  a(href="/post/new") write new
  | 
  a(href="/") all posts
#articles
    - each post in posts
      div(class="post", id=post._id)
        h2 
            a(href="/post/"+post._id)!= post.title
        div.body= post.body
        - each tag in post.tags
          | #
          a(href="/tag/"+tag)!= tag
          | 
        div.created_at= post.created_at
        div(class="votes", id=post._id+"_votes") Rating: 
          =post.votes
        div
          a(href="#", onclick="praise(\""+post._id+"\")") praise
          | 
          a(href="#", onclick="blame(\""+post._id+"\")") blame
